package com.sensetime.jv.service;

import com.github.pagehelper.PageInfo;
import com.sensetime.jv.entity.PermissionsJv;
import com.sensetime.jv.vo.request.PermissionListReqVO;
import com.sensetime.jv.vo.request.PermissionSaveReqVO;
import com.sensetime.jv.vo.request.PermissionUrlEditReqVO;
import com.sensetime.jv.vo.response.PermissionRespVO;
import org.springframework.transaction.annotation.Transactional;

public interface PermissionService {
    PageInfo<PermissionRespVO> list(String name, Integer page, Integer size);

    void deleteById(Long id);

    void updateById(PermissionUrlEditReqVO reqVO);

    /* ---------- permissions 表 ---------- */
    PageInfo<PermissionsJv> listPermissions(PermissionListReqVO vo);

    PermissionsJv getPermissionById(Integer id);

    Integer savePermission(PermissionSaveReqVO vo);

    @Transactional
    void deletePermission(Integer id);
}
